home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 07 - 1991 / 07.02 Feb 91 / xserial source ƒ / s_len.c < prev    next >
Encoding:
Text File  |  1989-12-09  |  126 b   |  14 lines  |  [TEXT/KAHL]

  1. /* s_len
  2.  *     returns length of a string
  3.  */
  4.  
  5. short    s_len(s)
  6.     char    *s;
  7. {
  8.     short    i;
  9.     
  10.     i = 0;
  11.     while (*s++)
  12.         i++;
  13.     return i;
  14. }